package worko5;
import java.io.File;
public class Test05 {
    public static void main(String[] args) {
        File file = new File("D:/");
        File[] files = file.listFiles();
        System.out.println("文件：");
        for (File file1 : files){
            if (file1.isFile()){
                System.out.println("\t\t" + file1.getName());
            }
        }
        System.out.println("文件夹：");
        for (File file1 : files){
            if (file1.isDirectory()){
                System.out.println("\t\t" + file1.getName());
            }
        }
    }
}
